// localStorage的使用
// 存: localStorage.setItem('key',value)
// 取: localStorage.getItem(key)
// 删: localStorage.removeItem('key')
// 清除: localStorage.clear()
const tokenKey = 'BlackHorseNews'
const saveToken = function (obj) {
    localStorage.setItem(tokenKey,JSON.stringify(obj))
}
const getToken = function () {
    return JSON.parse(localStorage.getItem(tokenKey))
}
const removeToken = function () {
    localStorage.removeItem(tokenKey)
}

export { saveToken, getToken, removeToken }
